import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  state: {
    islogin: false,
    admin: {},
    code:'',
    active:'home',
    activeIndex:'首页',
    leftnav:'首页',








    homePage: {},
    tempData: [],
  },
  mutations: {
    ctempData(state, x) {
      this.state.tempData = x;
    },
    cnavs(state, x) {
      this.state.navs = x;
    },
    cleftnav(state, x) {
      this.state.leftnav = x;
    },
    cactive(state, x) {
      this.state.active = x;
    },
    cactiveIndex(state, x) {
      this.state.activeIndex = x;
    },
    clogin(state, x) {
      this.state.islogin = x;
    },
    cadmin(state, x) {
      this.state.admin = x;
    },
    ccode(state, x) {
      this.state.code = x;
    },





    


    chomePage(state, x) {
      this.state.homePage = x;
    },
  },
  //   actions,
  //   getters,
  //   modules: {},
  strict: debug,
  //   plugins: debug ? [createLogger()] : []
})